<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>流程管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ta/liucheng/">流程列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="liucheng" action="${ctx}/ta/liucheng/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			
			<li><label>业务类型：</label>
				<select name="业务类型" class="input-medium">
					<option value="">全部类型</option>
					<c:forEach items="${ls}" var="ls">
						<option value="${ls}">${ls}</option>
					</c:forEach>
				</select>
			</li>
			<li><label>优先级：</label>
				<select name="优先级" class="input-medium" >
					<option value="">全部</option>
					<option value="0">普通</option>
					<option value="1">加急</option>
					<option value="2">特急</option>
				</select>
			</li>
			<li><label>编号：</label>
				<form:input path="iid" htmlEscape="false" maxlength="19" class="input-medium"/>
			</li>
			<li><label>申请单位：</label>
				<form:input path="申请单位" htmlEscape="false" maxlength="512" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>编号</th>
				<th>案件类型</th>
				<th>申请单位</th>
				<th>联系人</th>
				<th>接件时间</th>
				<th>优先级</th>
				<shiro:hasPermission name="ta:liucheng:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach varStatus="i" items="${page.list}" var="liucheng">
			<tr>
				<td>${i.count}</td>
				<td>${liucheng.iid}</td>
				<td>
					${liucheng.业务类型}
				</td>
				<td>
					${liucheng.申请单位}
				</td>
				<td>
					${liucheng.联系人}
				</td>
				<td>
					<fmt:formatDate value="${liucheng.接件时间}" pattern="yyyy-MM-dd" />
				</td>
				<td>
					<c:if test="${liucheng.优先级 == 0}"><span style="color: blue">普通件</span></c:if>
					<c:if test="${liucheng.优先级 == 1}"><span style="color: yellow">加急件</span></c:if>
					<c:if test="${liucheng.优先级 == 2}"><span style="color: red">特急件</span></c:if>
				</td>
				<td>
					<a href="${ctx}/ta/liucheng/delete?iid=${liucheng.iid}" onclick="return confirmx('确认要删除该流程吗？', this.href)">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>